package com.maisuiit.basics;

/**
 * @Description:
 * @Author: zhangcc
 * @CreateTime: 2022-10-25
 */
public class PrintGraph3 {
    // 平行四边形
    public static void main(String []args){
        int lay=5;
        for(int i=1;i<=lay;i++){
            for(int j=1;j<=i-1;j++){
                System.out.print(" ");
            }
            for(int k=1;k<=(lay-1)*2+1;k++){
                System.out.print("*");
            }
            System.out.println();
        }
        PrintGraph3 d1= new PrintGraph3();
        d1.Sj();
    }


    //倒三角形
    public void Sj(){
        int lay1=5;
        for(int a=1;a<=lay1;a++){
            for(int b=1;b<=a-1;b++){
                System.out.print(" ");
            }
            for(int c=1;c<=(lay1-a)*2+1;c++){

                System.out.print("*");
            }
            System.out.println();
        }
    }

}
